package timing.ukulele.third.dictionary.wx;

import java.util.Arrays;

/**
 * @author zh
 * @Description: 回复消息类型
 */
public enum WxAutoRepTypeEnum {

    text("text", "文本"),
    image("image", "图片"),
    voice("voice", "语音"),
    video("video", "视频"),
    music("music", "音乐"),
    news("news", "图文");

    private String value;
    private String desc;

    WxAutoRepTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return value;
    }

    public static WxAutoRepTypeEnum getByCode(String value) {
        return Arrays.stream(values()).filter(item ->
                item.getValue().equals(value)).findFirst().orElseGet(null);
    }

}
